using System;
using System.Collections.Generic;
using BitMango;
using UnityEngine;

public static class EconomyLog
{
	public static void SendEconomyLog(LOG_FROM from, LOG_TYPE logType, string item, int quantity)
	{
		if (quantity < 1)
		{
			return;
		}
		LOG_ITEM item2 = EconomyLog.GetItem(item);
		float num = (item2 == LOG_ITEM.NONE) ? ((float)(quantity * -1)) : (EconomyLog.price[EconomyLog.GetItem(item)] * (float)quantity);
		if (Profile.IsEnableCheat)
		{
			UnityEngine.Debug.Log("-------------------------------------------------");
			UnityEngine.Debug.Log(string.Concat(new object[]
			{
				"==== Economy : ",
				from.ToString(),
				" / ",
				item,
				" / ",
				(int)logType,
				" / ",
				num
			}));
			UnityEngine.Debug.Log("-------------------------------------------------");
		}
		else
		{
			DWATTHelper.logEvent("Economy", new object[]
			{
				from.ToString(),
				item,
				(int)logType,
				num
			});
		}
	}

	public static LOG_ITEM GetItem(string _value)
	{
		string text = _value.ToLower();
		if (text.Contains("coin"))
		{
			return LOG_ITEM.COIN;
		}
		return LOG_ITEM.NONE;
	}

	private static Dictionary<LOG_ITEM, float> price = new Dictionary<LOG_ITEM, float>
	{
		{
			LOG_ITEM.COIN,
			0.41f
		},
		{
			LOG_ITEM.FREEGIFT,
			0f
		}
	};
}
